import request from '@/utils/request'
/* eslint-disable */


/**
 * 获取企业列表
 * @param {*} params 
 * @returns 
 */
export function getEnterpriseListAPI(params) {
  return request({
    url: '/park/enterprise',
    method: 'get',
    params
  })
}


/**
 * 获取所属行业
 * @returns 
 */
export function getIndustryListAPI(){
  return request({
    url: '/park/industry',
    
  })
}

/**
 * 添加企业
 * @param {*} data 
 * @returns 
 */

export function addEnterpriseAPI(data){
  return request({
    url: '/park/enterprise',
    method: 'post',
    data
  })
}

/**
 * 获取合同详情
 * @param {*} id
 * @returns
 */
export function getEnterpriseDetailAPI(id) {
  return request({
    url: `/park/enterprise/${id}`
  })
}

/**
 * 更新企业
 * @param {*} data
 * @returns
 */
export function updateExterpriseAPI(data) {
  return request({
    url: '/park/enterprise',
    method: 'PUT',
    data
  })
}

/**删除企业
 * 
 * @param {*} id 
 * @returns 
 */

export function deleteEnterpriseAPI(id) {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'DELETE'
  })
}


/**
 * 获取楼宇列表
 * @param {*} id
 * @returns
 */
export function getRentBuildingAPI() {
  return request({
    url: '/park/rent/building'
  })
}


/**
 * 添加租聘合同
 * @param {*} data 
 * @returns 
 */
export function addRentAPI(data){
  return request({
    url: '/park/enterprise/rent',
    method: 'POST',
    data

  })
}

/**
 * 租聘合同
 * @param {*} id 
 * @returns 
 */
export function getEnterpriseRentBulidingAPI(id){
  return request({
    url: `/park/enterprise/rent/${id}`,
    method: 'GET',
    
  })
}


/**
 * 退租
 * @param {*} id 租凭合同id
 * @returns 
 */

export function rentingOutAPI(id){
  return request({
    url: `/park/enterprise/rent/${id}`,
    method: 'PUT',
    
  })
}